package com.lin.eventbus.callback;

import com.lin.eventbus.Event;
import com.lin.eventbus.EventChannel;
import com.lin.eventbus.function.LCallback;
import org.jetbrains.annotations.NotNull;

@EventChannel("/lin/core")
final public class CallbackEvent extends Event {

    private final LCallback<?> callback;

    public CallbackEvent(@NotNull LCallback<?> callback) {
        this.callback = callback;
        setRaiseException(true);
    }

    @NotNull
    public LCallback<?> getCallback() {
        return callback;
    }
}
